/*
 * Copyright 2002-2006 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.tigris.jasmincc.framework.namespace;

import java.io.File;
import java.io.FilenameFilter;
import java.util.Map;

import org.tigris.jasmincc.utils.SimpleFileNameFilter;

/**
 * @author Sam Huang
 * 
 */
public class AbstractNamespace {

	protected static final FilenameFilter filter = new SimpleFileNameFilter(
			".jcc");

	protected Map<String, File> entities = null;

	protected String grammarBase;

	protected String name;

	/**
	 * 
	 * @return
	 */
	public File[] getEntities() {
		return entities.values().toArray(new File[] {});
	}

	/**
	 * 
	 * @param name
	 * @return
	 */
	public File getEntity(String name) {
		return entities.get(name);
	}

	/**
	 * 
	 * @return
	 */
	public String getName() {
		return this.name;
	}

	/**
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the grammarBase
	 */
	public String getGrammarBase() {
		return grammarBase;
	}
}
